package com.itheima.tanhua.exception;

import com.itheima.tanhua.vo.ErrorResult;

/**
 * @author Lff
 * @date 2022/3/24
 * 业务异常类
 */
public class BusinessException extends RuntimeException {

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }

    public ErrorResult getErrorResult() {
        return errorResult;
    }
}
